using System.Globalization;
using System.Windows.Data;

namespace Koala.Pro.Helpers;

internal class GenderColorConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value == null)
        {
            return "";
        }
        if (value.ToString() == "男")
        {
            return "green";
        }
        return "red";
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
